package com.moonshineproject.plugin.svn.provider
{
	public class SVNStatus
	{
		public var shortStatus:String;
		protected var _status:String;
		public function get status():String
		{
			return _status;
		}
		public function set status(v:String):void
		{
			_status = v;
			shortStatus = 
				(v == "modified") ? "m" :
				(v == "unversioned") ? "?" :
				(v == "obstructed") ? "!" :
				(v == "added") ? "+" :
				(v == "deleted") ? "d":
				(v == "childChanged") ? "*" : // Non-SVN entry, used to indicate that an item further down is changed 
				"ERR"; 
		}
		
		public function get canBeCommited():Boolean
		{
			if (["modified", "added", "unversioned"].indexOf(status) > -1)
				return true;
			else
				return false;
		}
		
		public var revision:int;
		public var author:String;
		public var date:Date;
		public var treeConflict:Boolean;
	}
}